Optimal. Leaf size=206 \[ \frac{\sqrt{a+c x^2} \left (2 \left (d h^2-e g h+f g^2\right )-h x (f g-e h)\right )}{2 h^3}-\frac{\tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right ) \left (\left (a h^2+2 c g^2\right ) (f g-e h)+2 c d g h^2\right )}{2 \sqrt{c} h^4}-\frac{\sqrt{a h^2+c g^2} \left (d h^2-e g h+f g^2\right ) \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{a+c x^2} \sqrt{a h^2+c g^2}}\right )}{h^4}+\frac{f \left (a+c x^2\right )^{3/2}}{3 c h} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.391578, antiderivative size = 206, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.207, Rules used = {1654, 815, 844, 217, 206, 725} \[ \frac{\sqrt{a+c x^2} \left (2 \left (d h^2-e g h+f g^2\right )-h x (f g-e h)\right )}{2 h^3}-\frac{\tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right ) \left (\left (a h^2+2 c g^2\right ) (f g-e h)+2 c d g h^2\right )}{2 \sqrt{c} h^4}-\frac{\sqrt{a h^2+c g^2} \left (d h^2-e g h+f g^2\right ) \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{a+c x^2} \sqrt{a h^2+c g^2}}\right )}{h^4}+\frac{f \left (a+c x^2\right )^{3/2}}{3 c h} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1654
Rule 815
Rule 844
Rule 217
Rule 206
Rule 725
Rubi steps
\begin{align*} \int \frac{\sqrt{a+c x^2} \left (d+e x+f x^2\right )}{g+h x} \, dx &=\frac{f \left (a+c x^2\right )^{3/2}}{3 c h}+\frac{\int \frac{\left (3 c d h^2-3 c h (f g-e h) x\right ) \sqrt{a+c x^2}}{g+h x} \, dx}{3 c h^2}\\ &=\frac{\left (2 \left (f g^2-e g h+d h^2\right )-h (f g-e h) x\right ) \sqrt{a+c x^2}}{2 h^3}+\frac{f \left (a+c x^2\right )^{3/2}}{3 c h}+\frac{\int \frac{3 a c^2 h^2 \left (f g^2-h (e g-2 d h)\right )-3 c^2 h \left (2 c d g h^2+(f g-e h) \left (2 c g^2+a h^2\right )\right ) x}{(g+h x) \sqrt{a+c x^2}} \, dx}{6 c^2 h^4}\\ &=\frac{\left (2 \left (f g^2-e g h+d h^2\right )-h (f g-e h) x\right ) \sqrt{a+c x^2}}{2 h^3}+\frac{f \left (a+c x^2\right )^{3/2}}{3 c h}+\frac{\left (\left (c g^2+a h^2\right ) \left (f g^2-e g h+d h^2\right )\right ) \int \frac{1}{(g+h x) \sqrt{a+c x^2}} \, dx}{h^4}-\frac{\left (2 c d g h^2+(f g-e h) \left (2 c g^2+a h^2\right )\right ) \int \frac{1}{\sqrt{a+c x^2}} \, dx}{2 h^4}\\ &=\frac{\left (2 \left (f g^2-e g h+d h^2\right )-h (f g-e h) x\right ) \sqrt{a+c x^2}}{2 h^3}+\frac{f \left (a+c x^2\right )^{3/2}}{3 c h}-\frac{\left (\left (c g^2+a h^2\right ) \left (f g^2-e g h+d h^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{c g^2+a h^2-x^2} \, dx,x,\frac{a h-c g x}{\sqrt{a+c x^2}}\right )}{h^4}-\frac{\left (2 c d g h^2+(f g-e h) \left (2 c g^2+a h^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{1-c x^2} \, dx,x,\frac{x}{\sqrt{a+c x^2}}\right )}{2 h^4}\\ &=\frac{\left (2 \left (f g^2-e g h+d h^2\right )-h (f g-e h) x\right ) \sqrt{a+c x^2}}{2 h^3}+\frac{f \left (a+c x^2\right )^{3/2}}{3 c h}-\frac{\left (2 c d g h^2+(f g-e h) \left (2 c g^2+a h^2\right )\right ) \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{2 \sqrt{c} h^4}-\frac{\sqrt{c g^2+a h^2} \left (f g^2-e g h+d h^2\right ) \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{c g^2+a h^2} \sqrt{a+c x^2}}\right )}{h^4}\\ \end{align*}
Mathematica [A] time = 0.477019, size = 224, normalized size = 1.09 \[ \frac{\left (h (d h-e g)+f g^2\right ) \left (-\sqrt{a h^2+c g^2} \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{a+c x^2} \sqrt{a h^2+c g^2}}\right )-\sqrt{c} g \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )+h \sqrt{a+c x^2}\right )}{h^4}+\frac{\sqrt{a+c x^2} \left (\sqrt{c} x \sqrt{\frac{c x^2}{a}+1}+\sqrt{a} \sinh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right )\right ) (e h-f g)}{2 \sqrt{c} h^2 \sqrt{\frac{c x^2}{a}+1}}+\frac{f \left (a+c x^2\right )^{3/2}}{3 c h} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.301, size = 1265, normalized size = 6.1 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{a + c x^{2}} \left (d + e x + f x^{2}\right )}{g + h x}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.26604, size = 375, normalized size = 1.82 \begin{align*} \frac{1}{6} \, \sqrt{c x^{2} + a}{\left ({\left (\frac{2 \, f x}{h} - \frac{3 \,{\left (c f g h^{8} - c h^{9} e\right )}}{c h^{10}}\right )} x + \frac{2 \,{\left (3 \, c f g^{2} h^{7} + 3 \, c d h^{9} + a f h^{9} - 3 \, c g h^{8} e\right )}}{c h^{10}}\right )} + \frac{2 \,{\left (c f g^{4} + c d g^{2} h^{2} + a f g^{2} h^{2} + a d h^{4} - c g^{3} h e - a g h^{3} e\right )} \arctan \left (-\frac{{\left (\sqrt{c} x - \sqrt{c x^{2} + a}\right )} h + \sqrt{c} g}{\sqrt{-c g^{2} - a h^{2}}}\right )}{\sqrt{-c g^{2} - a h^{2}} h^{4}} + \frac{{\left (2 \, c^{\frac{3}{2}} f g^{3} + 2 \, c^{\frac{3}{2}} d g h^{2} + a \sqrt{c} f g h^{2} - 2 \, c^{\frac{3}{2}} g^{2} h e - a \sqrt{c} h^{3} e\right )} \log \left ({\left | -\sqrt{c} x + \sqrt{c x^{2} + a} \right |}\right )}{2 \, c h^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]